<!DOCTYPE html>
<html data-dpr="1" style="font-size: 37.5px;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
    <title>{$Think.lang.my_pass2}</title>
    <link href="/static_new6/css/app.7b22fa66c2af28f12bf32977d4b82694.css" rel="stylesheet">
    <link rel="stylesheet" href="/static_new/css/public.css">

    <script charset="utf-8" src="/static_new/js/jquery.min.js"></script>
    <script charset="utf-8" src="/static_new/js/dialog.min.js"></script>
    <script charset="utf-8" src="/static_new/js/common.js"></script>

    <style type="text/css" title="fading circle style">
        .circle-color-8 > div::before {
            background-color: #ccc;
        }
    </style>
</head>
<body style="font-size: 12px;">
<div id="app">
    <div data-v-61ea9512="" class="main">
        <div data-v-61ea9512="" class="header">
            <div class="left_btn" onclick="window.history.back(-1)">
                <img
                        src=""
                        alt="" class="return">
            </div>
            <div class="Maintitle"><h3>{$Think.lang.my_pass2}</h3></div>
            <div class="right_btn"></div>
        </div>
        <form action="" id="forgetpwd-form">
            <div data-v-61ea9512="" class="bink_card" style="display: ;">
                <h3 data-v-61ea9512="">{$Think.lang.please_newpass}</h3>
                <ul data-v-61ea9512="" class="bink_card_ul">
                    <li data-v-61ea9512=""><h4 data-v-61ea9512="">{$Think.lang.dl_mim}</h4>
                        <input data-v-61ea9512="" type="text" name="old_pwd" placeholder="{$Think.lang.q_dl_mim}">
                        <input data-v-61ea9512="" type="hidden" name="type" value="2">
                    </li>
                    <li data-v-61ea9512=""><h4 data-v-61ea9512="">{$Think.lang.new_pass}</h4>
                        <input data-v-61ea9512="" name="new_pwd"  type="text" placeholder="{$Think.lang.q_new_pass}">
                    </li>
                    <li data-v-61ea9512="">
                        <h4 data-v-61ea9512="">{$Think.lang.qu_newpass}</h4>
                        <input data-v-61ea9512="" name="password_confirm" type="text" placeholder="{$Think.lang.q_mew_pass2}">
                    </li>
                </ul>
                <p data-v-cc2885a2="" style="padding: 20px">{$Think.lang.qljmima}</p>
            </div>
            <button data-v-61ea9512="" class="form-buttom">{$Think.lang.xyb}</button>
        <button data-v-61ea9512="" style="display: none;">{$Think.lang.queding}</button></form>
    </div>

</div>

<script type="application/javascript">
    $(function () {
        var countdown = 120;
        var flag = true;
        var loading = null;

        function check() {
            if ($("input[name=old_pwd]").val() == '' || $("input[name=new_pwd]").val() == '') {
                $(document).dialog({infoText: '{$Think.lang.q_new_pass}'});
                return false;
            }
            if ($("input[name=new_pwd]").val() !== $("input[name=password_confirm]").val()) {
                $(document).dialog({infoText: '{$Think.lang.login_passnot}'});
                return false;
            }
            return true;
        }

        $(".form-buttom").on('click', function () {
            if (check()) {
                $.ajax({
                    url: '/index/ctrl/set_pwd',
                    data: $("#forgetpwd-form").serialize(),
                    type: 'POST',
                    beforeSend: function () {
                        loading = $(document).dialog({
                            type: 'notice',
                            infoIcon: '/static_new/img/loading.gif',
                            infoText: '{$Think.lang.bank_loding}',
                            autoClose: 0
                        });
                    },
                    success: function (data) {
                        if (data.code==0) {
                            $(document).dialog({infoText: data.info});
                            setTimeout(function () {
                                window.location.href = '/index/ctrl/set';
                            }, 2000);
                        } else {
                            loading.close();
                            $(document).dialog({infoText: data.info});
                        }
                    }
                });
            }
            return false;
        })
    })
</script>


</body>
</html>